package gtkwire.gobject;

import gtkwire.GTKWireCommand;

public class GtkTreeViewColumn extends GObject
{
	
	public GtkTreeViewColumn( String title, GtkCellRenderer renderer )
	{
		super(GO_GtkTreeViewColumn);

		String[] msg = 
			{ title,
			Integer.toString(renderer.getId()),
			Integer.toString(renderer.modelColumn),
			renderer.columnAttr };

		createGObjectInstance( msg );

		if( renderer.dFunc != null )
		{
			GtkTreeModel.registerDataFuncN( getId(), renderer.getId(), renderer.dFunc.getId() );
			GtkTreeModel.addDataFuncFilter(  renderer.dFunc.getId(),  renderer.dFunc );
		}
	}

	public void setSortingIndicator( boolean val )
	{
		String[] msg = { Boolean.toString( val ), Integer.toString( id ) };
		app().sendCommand( MAGIC_NAME, GTKWireCommand.TW_COL_SET_SORT_INDICATOR, msg );
	}

}//end class
